﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Day2.AnimationPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="MyStoryBoard" AutoReverse="True" RepeatBehavior="Forever">
			<DoubleAnimation Duration="0:0:1" To="600" Storyboard.TargetProperty="(Canvas.Top)" Storyboard.TargetName="rectangle" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<BounceEase EasingMode="EaseOut"/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<ColorAnimation Duration="0:0:1" To="Blue" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="rectangle">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="324.11"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="321.761"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="-2.349">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="rectangle">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="2.349"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="-568.367"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="-561.321">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimation Duration="0:0:1" To="-84.55" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="272.44" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="ellipse">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="400"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="91"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ellipse">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="400"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="91"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-490.862"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-367.559"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-4.697"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-97.174"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="2.142"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="2.142"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="70"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="50.1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="41.7"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
	<Canvas>
		<Rectangle x:Name="rectangle" Fill="#FFF4F4F5" Height="88" Canvas.Left="37" Stroke="Black" Canvas.Top="38" Width="104" RenderTransformOrigin="0.5,0.5">
			<Rectangle.RenderTransform>
				<CompositeTransform/>
			</Rectangle.RenderTransform>
		</Rectangle>
		<Ellipse x:Name="ellipse" Fill="#FFF4F4F5" Height="91" Canvas.Left="260" Stroke="Black" Canvas.Top="38" Width="91" RenderTransformOrigin="0.5,0.5">
			<Ellipse.RenderTransform>
				<CompositeTransform/>
			</Ellipse.RenderTransform>
		</Ellipse>
		<Image x:Name="image" Height="162" Canvas.Left="503" Source="/Images/Penguins.jpg" Stretch="Fill" Canvas.Top="247" Width="216" RenderTransformOrigin="0.5,0.5">
			<Image.Projection>
				<PlaneProjection/>
			</Image.Projection>
			<Image.RenderTransform>
				<CompositeTransform/>
			</Image.RenderTransform>
		</Image>
	</Canvas>

	<!--LayoutRoot is the root grid where all page content is placed-->
</phone:PhoneApplicationPage>